/**
 * 2017年7月3日
 */
package org.textplantform.common.core;

import org.textplantform.common.api.core.Result;

/**
 * @author Alex
 *
 */
public class ExceptionResult implements Result{
	Throwable t;
	public ExceptionResult(Exception e) {
		t = e;
	}
	@Override
	public Object getValue() {
		return t;
	}

	@Override
	public Throwable getException() {
		return t;
	}

	@Override
	public boolean hasException() {
		return true;
	}

	@Override
	public ResultType getType() {
		return ResultType.EXCEPTION;
	}

}
